% function for geometric correction of reflectivity
function out=geo_corr(q_cutoff,q)
dq=0.0001;
f1=0.5*(1-erf((q-q_cutoff)/dq));
f2=0.5*(1+erf((q-q_cutoff)/dq));
out=q/q_cutoff.*f1+f2;
